package com.navinfo.platform.trip.common.arithmetic.var;

import com.navinfo.platform.trip.common.arithmetic.RangeSpeed;
import lombok.Data;

import java.io.Serializable;

/**
 * 车速区间统计算法{@link RangeSpeed}的统计变量
 * @author 沈东生
 */
@Data
public class VarRangeSpeed {
    /**
     * 车速区间01的统计变量
     */
    private VarCommon speed10 = new VarCommon();
    /**
     * 车速区间02的统计变量
     */
    private VarCommon speed20 = new VarCommon();
    /**
     * 车速区间03的统计变量
     */
    private VarCommon speed30 = new VarCommon();
    /**
     * 车速区间04的统计变量
     */
    private VarCommon speed40 = new VarCommon();
    /**
     * 车速区间05的统计变量
     */
    private VarCommon speed50 = new VarCommon();
    /**
     * 车速区间06的统计变量
     */
    private VarCommon speed60 = new VarCommon();
    /**
     * 车速区间07的统计变量
     */
    private VarCommon speed70 = new VarCommon();
    /**
     * 车速区间08的统计变量
     */
    private VarCommon speed80 = new VarCommon();
    /**
     * 车速区间09的统计变量
     */
    private VarCommon speed90 = new VarCommon();
    /**
     * 车速区间10的统计变量
     */
    private VarCommon speed100 = new VarCommon();
    /**
     * 车速区间11的统计变量
     */
    private VarCommon speed110 = new VarCommon();
    /**
     * 车速区间12的统计变量
     */
    private VarCommon speed120 = new VarCommon();
    /**
     * 车速区间超速的统计变量
     */
    private VarCommon speedOver120 = new VarCommon();

    /**
     * 非怠速状态下的最小速度(KM/H)
     */
    private Integer minSpeed;
    /**
     * 非怠速状态下的最大速度(KM/H)
     */
    private Integer maxSpeed;

    /**
     * 有效车速的最小最大值
     */
    private UsefulSpeed usefulSpeed = new UsefulSpeed();

    /**
     * 有效车速
     */
    @Data
    public static class UsefulSpeed implements Serializable {
        /**
         * 车速区间10的最大速度
         */
        private Integer speed10Max;
        /**
         * 车速区间10的最小速度
         */
        private Integer speed10Min;

        /**
         * 车速区间20的最大速度
         */
        private Integer speed20Max;
        /**
         * 车速区间20的最小速度
         */
        private Integer speed20Min;

        /**
         * 车速区间30的最大速度
         */
        private Integer speed30Max;
        /**
         * 车速区间30的最小速度
         */
        private Integer speed30Min;

        /**
         * 车速区间40的最大速度
         */
        private Integer speed40Max;
        /**
         * 车速区间40的最小速度
         */
        private Integer speed40Min;

        /**
         * 车速区间50的最大速度
         */
        private Integer speed50Max;
        /**
         * 车速区间50的最小速度
         */
        private Integer speed50Min;

        /**
         * 车速区间60的最大速度
         */
        private Integer speed60Max;
        /**
         * 车速区间60的最小速度
         */
        private Integer speed60Min;

        /**
         * 车速区间70的最大速度
         */
        private Integer speed70Max;
        /**
         * 车速区间70的最小速度
         */
        private Integer speed70Min;

        /**
         * 车速区间80的最大速度
         */
        private Integer speed80Max;
        /**
         * 车速区间80的最小速度
         */
        private Integer speed80Min;

        /**
         * 车速区间90的最大速度
         */
        private Integer speed90Max;
        /**
         * 车速区间90的最小速度
         */
        private Integer speed90Min;

        /**
         * 车速区间100的最大速度
         */
        private Integer speed100Max;
        /**
         * 车速区间100的最小速度
         */
        private Integer speed100Min;

        /**
         * 车速区间110的最大速度
         */
        private Integer speed110Max;
        /**
         * 车速区间110的最小速度
         */
        private Integer speed110Min;

        /**
         * 车速区间120的最大速度
         */
        private Integer speed120Max;
        /**
         * 车速区间120的最小速度
         */
        private Integer speed120Min;

        /**
         * 车速区间超过120的最大速度
         */
        private Integer speedOver120Max;
        /**
         * 车速区间超过120的最小速度
         */
        private Integer speedOver120Min;

        public void setUsefulSpeed10Min(int speed){
            if(null==speed10Min || speed<speed10Min){
                this.speed10Min = speed;
            }
        }
        public void setUsefulSpeed20Min(int speed){
            if(null==speed20Min || speed<speed20Min){
                this.speed20Min = speed;
            }
        }
        public void setUsefulSpeed30Min(int speed){
            if(null==speed30Min || speed<speed30Min){
                this.speed30Min = speed;
            }
        }
        public void setUsefulSpeed40Min(int speed){
            if(null==speed40Min || speed<speed40Min){
                this.speed40Min = speed;
            }
        }
        public void setUsefulSpeed50Min(int speed){
            if(null==speed50Min || speed<speed50Min){
                this.speed50Min = speed;
            }
        }
        public void setUsefulSpeed60Min(int speed){
            if(null==speed60Min || speed<speed60Min){
                this.speed60Min = speed;
            }
        }
        public void setUsefulSpeed70Min(int speed){
            if(null==speed70Min || speed<speed70Min){
                this.speed70Min = speed;
            }
        }
        public void setUsefulSpeed80Min(int speed){
            if(null==speed80Min || speed<speed80Min){
                this.speed80Min = speed;
            }
        }
        public void setUsefulSpeed90Min(int speed){
            if(null==speed90Min || speed<speed90Min){
                this.speed90Min = speed;
            }
        }
        public void setUsefulSpeed100Min(int speed){
            if(null==speed100Min || speed<speed100Min){
                this.speed100Min = speed;
            }
        }
        public void setUsefulSpeed110Min(int speed){
            if(null==speed110Min || speed<speed110Min){
                this.speed110Min = speed;
            }
        }
        public void setUsefulSpeed120Min(int speed){
            if(null==speed120Min || speed<speed120Min){
                this.speed120Min = speed;
            }
        }
        public void setUsefulSpeedOver120Min(int speed){
            if(null==speedOver120Min || speed<speedOver120Min){
                this.speedOver120Min = speed;
            }
        }


        public void setUsefulSpeed10Max(int speed){
            if(null==speed10Max || speed>speed10Max){
                this.speed10Max = speed;
            }
        }
        public void setUsefulSpeed20Max(int speed){
            if(null==speed20Max || speed>speed20Max){
                this.speed20Max = speed;
            }
        }
        public void setUsefulSpeed30Max(int speed){
            if(null==speed30Max || speed>speed30Max){
                this.speed30Max = speed;
            }
        }
        public void setUsefulSpeed40Max(int speed){
            if(null==speed40Max || speed>speed40Max){
                this.speed40Max = speed;
            }
        }
        public void setUsefulSpeed50Max(int speed){
            if(null==speed50Max || speed>speed50Max){
                this.speed50Max = speed;
            }
        }
        public void setUsefulSpeed60Max(int speed){
            if(null==speed60Max || speed>speed60Max){
                this.speed60Max = speed;
            }
        }
        public void setUsefulSpeed70Max(int speed){
            if(null==speed70Max || speed>speed70Max){
                this.speed70Max = speed;
            }
        }
        public void setUsefulSpeed80Max(int speed){
            if(null==speed80Max || speed>speed80Max){
                this.speed80Max = speed;
            }
        }
        public void setUsefulSpeed90Max(int speed){
            if(null==speed90Max || speed>speed90Max){
                this.speed90Max = speed;
            }
        }
        public void setUsefulSpeed100Max(int speed){
            if(null==speed100Max || speed>speed100Max){
                this.speed100Max = speed;
            }
        }
        public void setUsefulSpeed110Max(int speed){
            if(null==speed110Max || speed>speed110Max){
                this.speed110Max = speed;
            }
        }
        public void setUsefulSpeed120Max(int speed){
            if(null==speed120Max || speed>speed120Max){
                this.speed120Max = speed;
            }
        }
        public void setUsefulSpeedOver120Max(int speed){
            if(null==speedOver120Max || speed>speedOver120Max){
                this.speedOver120Max = speed;
            }
        }

    }

}
